package com.da.javatest.demo.basic;

/**
 * @Auther: chenlida
 * @Date: 2018/11/8 09:36
 * @Description:
 */
public class EqualTest {
    public static void main(String[] args) {
        Integer a = 12;
        Integer b = 12;
        Integer c = 133;
        Integer d = 133;
        Integer e = 24;
        int f = 133;

        System.out.println(a == b);         //true
        System.out.println(c == d);         //false
        System.out.println(f == c);         //true
        System.out.println(a + b == e);     //true

        System.out.println("--------------");
        String s1 = new String("do");
        s1.intern();
        String s2 = "do";
        System.out.println(s1 == s2);//false
        String s3 = new String("12") + new String("34");
        s3.intern();
        String s4 = "1234";
        System.out.println(s3 == s4);//true
    }
}
